package org.opengauss.sqltranslator.translatorenum;



public enum CommentTypeEnum {
    TABLE(1,"TABLE"),
    COLUMN(2,"COLUMN");
    private Integer code;
    private String desc;
    CommentTypeEnum() {
    }

    CommentTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static CommentTypeEnum getByCode(int code) {
        for (CommentTypeEnum color : CommentTypeEnum.values()) {
            if (color.getCode() == code) {
                return color;
            }
        }
        return null;
    }
}
